<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Cheetah Software: PeriodicTask Class Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Cheetah Software
   &#160;<span id="projectnumber">1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="../../annotated.html"><span>Classes</span></a></li>
      <li><a href="../../files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="../../annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="../../classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="../../inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="../../functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('de/d2f/class_periodic_task.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="../../da/d13/class_periodic_task-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">PeriodicTask Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="../../dc/d87/_periodic_task_8h_source.html">PeriodicTask.h</a>&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="../../closed.png" alt="+"/> Inheritance diagram for PeriodicTask:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d8/d86/class_periodic_task__inherit__graph.png" border="0" usemap="#_periodic_task_inherit__map" alt="Inheritance graph"/></div>
<map name="_periodic_task_inherit__map" id="_periodic_task_inherit__map">
</map>
</div>
<div id="dynsection-1" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-1-trigger" src="../../closed.png" alt="+"/> Collaboration diagram for PeriodicTask:</div>
<div id="dynsection-1-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-1-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d7/d88/class_periodic_task__coll__graph.png" border="0" usemap="#_periodic_task_coll__map" alt="Collaboration graph"/></div>
<map name="_periodic_task_coll__map" id="_periodic_task_coll__map">
</map>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aadb0c519e5d15feae5e66cdecaeb54f6"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d2f/class_periodic_task.html#aadb0c519e5d15feae5e66cdecaeb54f6">PeriodicTask</a> (<a class="el" href="../../d2/d31/class_periodic_task_manager.html">PeriodicTaskManager</a> *taskManager, float period, std::string name)</td></tr>
<tr class="separator:aadb0c519e5d15feae5e66cdecaeb54f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a23a65ac2dff9750a0f0d6416f2f32a6f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d2f/class_periodic_task.html#a23a65ac2dff9750a0f0d6416f2f32a6f">start</a> ()</td></tr>
<tr class="separator:a23a65ac2dff9750a0f0d6416f2f32a6f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad24498c03bd938845244546d52dfa24b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d2f/class_periodic_task.html#ad24498c03bd938845244546d52dfa24b">stop</a> ()</td></tr>
<tr class="separator:ad24498c03bd938845244546d52dfa24b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab9031986941baaf7183f4d24bc861110"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d2f/class_periodic_task.html#ab9031986941baaf7183f4d24bc861110">printStatus</a> ()</td></tr>
<tr class="separator:ab9031986941baaf7183f4d24bc861110"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a90827dff3d3383036747c5d2557693f8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d2f/class_periodic_task.html#a90827dff3d3383036747c5d2557693f8">clearMax</a> ()</td></tr>
<tr class="separator:a90827dff3d3383036747c5d2557693f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad6928f8428ae4944314011aee9fd4764"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d2f/class_periodic_task.html#ad6928f8428ae4944314011aee9fd4764">isSlow</a> ()</td></tr>
<tr class="separator:ad6928f8428ae4944314011aee9fd4764"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8bc384b67a67e01b29afc0362732204d"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d2f/class_periodic_task.html#a8bc384b67a67e01b29afc0362732204d">init</a> ()=0</td></tr>
<tr class="separator:a8bc384b67a67e01b29afc0362732204d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae6976f44c995555b6403b38443fb2eb5"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d2f/class_periodic_task.html#ae6976f44c995555b6403b38443fb2eb5">run</a> ()=0</td></tr>
<tr class="separator:ae6976f44c995555b6403b38443fb2eb5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5b4d756df249cf8adda268d509390ef4"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d2f/class_periodic_task.html#a5b4d756df249cf8adda268d509390ef4">cleanup</a> ()=0</td></tr>
<tr class="separator:a5b4d756df249cf8adda268d509390ef4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:add1474723c0d9c4e96327b7997ea176e"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d2f/class_periodic_task.html#add1474723c0d9c4e96327b7997ea176e">~PeriodicTask</a> ()</td></tr>
<tr class="separator:add1474723c0d9c4e96327b7997ea176e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a737939f2375ed06e4e7eaf10cdb25a61"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d2f/class_periodic_task.html#a737939f2375ed06e4e7eaf10cdb25a61">getPeriod</a> ()</td></tr>
<tr class="separator:a737939f2375ed06e4e7eaf10cdb25a61"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0a6c73bcf016d81e4de77ca8a20f7329"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d2f/class_periodic_task.html#a0a6c73bcf016d81e4de77ca8a20f7329">getRuntime</a> ()</td></tr>
<tr class="separator:a0a6c73bcf016d81e4de77ca8a20f7329"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb803276382ca63ba019191c83ea3a86"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d2f/class_periodic_task.html#aeb803276382ca63ba019191c83ea3a86">getMaxPeriod</a> ()</td></tr>
<tr class="separator:aeb803276382ca63ba019191c83ea3a86"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adf7a674830010fe0dddf08683cc977dc"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d2f/class_periodic_task.html#adf7a674830010fe0dddf08683cc977dc">getMaxRuntime</a> ()</td></tr>
<tr class="separator:adf7a674830010fe0dddf08683cc977dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr class="memitem:a749e849501c8369723c1b7822c5a2dc5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d2f/class_periodic_task.html#a749e849501c8369723c1b7822c5a2dc5">loopFunction</a> ()</td></tr>
<tr class="separator:a749e849501c8369723c1b7822c5a2dc5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:af395b5169de444767ae3b0ccd6175942"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d2f/class_periodic_task.html#af395b5169de444767ae3b0ccd6175942">_period</a></td></tr>
<tr class="separator:af395b5169de444767ae3b0ccd6175942"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a285fb43831f136ac3dce9566b4b50a8d"><td class="memItemLeft" align="right" valign="top">volatile bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d2f/class_periodic_task.html#a285fb43831f136ac3dce9566b4b50a8d">_running</a> = false</td></tr>
<tr class="separator:a285fb43831f136ac3dce9566b4b50a8d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae3788f2b05fc248745ee93f41da24c8f"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d2f/class_periodic_task.html#ae3788f2b05fc248745ee93f41da24c8f">_lastRuntime</a> = 0</td></tr>
<tr class="separator:ae3788f2b05fc248745ee93f41da24c8f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5e68d6cc68240995a142b8825b8df174"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d2f/class_periodic_task.html#a5e68d6cc68240995a142b8825b8df174">_lastPeriodTime</a> = 0</td></tr>
<tr class="separator:a5e68d6cc68240995a142b8825b8df174"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae613597442fa17fcbf362de31ce61920"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d2f/class_periodic_task.html#ae613597442fa17fcbf362de31ce61920">_maxPeriod</a> = 0</td></tr>
<tr class="separator:ae613597442fa17fcbf362de31ce61920"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afa649a810c363bc0567336e663868421"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d2f/class_periodic_task.html#afa649a810c363bc0567336e663868421">_maxRuntime</a> = 0</td></tr>
<tr class="separator:afa649a810c363bc0567336e663868421"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a18972d9e1945410256791965f3730dae"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d2f/class_periodic_task.html#a18972d9e1945410256791965f3730dae">_name</a></td></tr>
<tr class="separator:a18972d9e1945410256791965f3730dae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa7928c99eb0134cf58398c7eb885c41c"><td class="memItemLeft" align="right" valign="top">std::thread&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d2f/class_periodic_task.html#aa7928c99eb0134cf58398c7eb885c41c">_thread</a></td></tr>
<tr class="separator:aa7928c99eb0134cf58398c7eb885c41c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A single periodic task which will call <a class="el" href="../../de/d2f/class_periodic_task.html#ae6976f44c995555b6403b38443fb2eb5">run()</a> at the given frequency </p>

<p>Definition at line <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00019">19</a> of file <a class="el" href="../../dc/d87/_periodic_task_8h_source.html">PeriodicTask.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aadb0c519e5d15feae5e66cdecaeb54f6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">PeriodicTask::PeriodicTask </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d2/d31/class_periodic_task_manager.html">PeriodicTaskManager</a> *&#160;</td>
          <td class="paramname"><em>taskManager</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>period</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>name</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../de/df7/_periodic_task_8cpp_source.html#l00014">14</a> of file <a class="el" href="../../de/df7/_periodic_task_8cpp_source.html">PeriodicTask.cpp</a>.</p>

<p>References <a class="el" href="../../de/df7/_periodic_task_8cpp_source.html#l00098">PeriodicTaskManager::addTask()</a>.</p>
<div class="fragment"><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;    : <a class="code" href="../../de/d2f/class_periodic_task.html#af395b5169de444767ae3b0ccd6175942">_period</a>(period), <a class="code" href="../../de/d2f/class_periodic_task.html#a18972d9e1945410256791965f3730dae">_name</a>(name) {</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;  taskManager-&gt;<a class="code" href="../../d2/d31/class_periodic_task_manager.html#aa50992596d26d9ac9b9c741015d990d2">addTask</a>(<span class="keyword">this</span>);</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;}</div><div class="ttc" id="class_periodic_task_html_af395b5169de444767ae3b0ccd6175942"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html#af395b5169de444767ae3b0ccd6175942">PeriodicTask::_period</a></div><div class="ttdeci">float _period</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d87/_periodic_task_8h_source.html#l00044">PeriodicTask.h:44</a></div></div>
<div class="ttc" id="class_periodic_task_html_a18972d9e1945410256791965f3730dae"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html#a18972d9e1945410256791965f3730dae">PeriodicTask::_name</a></div><div class="ttdeci">std::string _name</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d87/_periodic_task_8h_source.html#l00050">PeriodicTask.h:50</a></div></div>
<div class="ttc" id="class_periodic_task_manager_html_aa50992596d26d9ac9b9c741015d990d2"><div class="ttname"><a href="../../d2/d31/class_periodic_task_manager.html#aa50992596d26d9ac9b9c741015d990d2">PeriodicTaskManager::addTask</a></div><div class="ttdeci">void addTask(PeriodicTask *task)</div><div class="ttdef"><b>Definition:</b> <a href="../../de/df7/_periodic_task_8cpp_source.html#l00098">PeriodicTask.cpp:98</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-2" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-2-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-2-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-2-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../de/d2f/class_periodic_task_aadb0c519e5d15feae5e66cdecaeb54f6_cgraph.png" border="0" usemap="#de/d2f/class_periodic_task_aadb0c519e5d15feae5e66cdecaeb54f6_cgraph" alt=""/></div>
<map name="de/d2f/class_periodic_task_aadb0c519e5d15feae5e66cdecaeb54f6_cgraph" id="de/d2f/class_periodic_task_aadb0c519e5d15feae5e66cdecaeb54f6_cgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="add1474723c0d9c4e96327b7997ea176e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual PeriodicTask::~PeriodicTask </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00031">31</a> of file <a class="el" href="../../dc/d87/_periodic_task_8h_source.html">PeriodicTask.h</a>.</p>

<p>References <a class="el" href="../../de/df7/_periodic_task_8cpp_source.html#l00031">stop()</a>.</p>
<div class="fragment"><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;{ <a class="code" href="../../de/d2f/class_periodic_task.html#ad24498c03bd938845244546d52dfa24b">stop</a>(); }</div><div class="ttc" id="class_periodic_task_html_ad24498c03bd938845244546d52dfa24b"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html#ad24498c03bd938845244546d52dfa24b">PeriodicTask::stop</a></div><div class="ttdeci">void stop()</div><div class="ttdef"><b>Definition:</b> <a href="../../de/df7/_periodic_task_8cpp_source.html#l00031">PeriodicTask.cpp:31</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-3" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-3-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-3-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-3-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../de/d2f/class_periodic_task_add1474723c0d9c4e96327b7997ea176e_cgraph.png" border="0" usemap="#de/d2f/class_periodic_task_add1474723c0d9c4e96327b7997ea176e_cgraph" alt=""/></div>
<map name="de/d2f/class_periodic_task_add1474723c0d9c4e96327b7997ea176e_cgraph" id="de/d2f/class_periodic_task_add1474723c0d9c4e96327b7997ea176e_cgraph">
</map>
</div>
</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a5b4d756df249cf8adda268d509390ef4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void PeriodicTask::cleanup </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Implemented in <a class="el" href="../../dd/de7/class_periodic_member_function.html#aba946e40d8ec8ad6c5e41d4193c99009">PeriodicMemberFunction&lt; T &gt;</a>, <a class="el" href="../../dc/d6d/class_print_task_status.html#ab69ab60d1b29bf063cf7ebcd8dc25030">PrintTaskStatus</a>, <a class="el" href="../../d2/da2/class_periodic_function.html#aaaf946be8af28bd438509975fe300d53">PeriodicFunction</a>, <a class="el" href="../../d6/d05/class_robot_interface.html#aed1c0409402e993b2068b3ba98f080ea">RobotInterface</a>, <a class="el" href="../../d9/d42/class_robot_runner.html#aa6343490aaae621d14e9dfb920284d58">RobotRunner</a>, and <a class="el" href="../../d4/d77/class_test_periodic_task.html#a29c1b9fe745ede40aa269f5ad5bd5d0f">TestPeriodicTask</a>.</p>

<p><div id="dynsection-4" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-4-trigger" src="../../closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-4-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-4-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../de/d2f/class_periodic_task_a5b4d756df249cf8adda268d509390ef4_icgraph.png" border="0" usemap="#de/d2f/class_periodic_task_a5b4d756df249cf8adda268d509390ef4_icgraph" alt=""/></div>
<map name="de/d2f/class_periodic_task_a5b4d756df249cf8adda268d509390ef4_icgraph" id="de/d2f/class_periodic_task_a5b4d756df249cf8adda268d509390ef4_icgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a90827dff3d3383036747c5d2557693f8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PeriodicTask::clearMax </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../de/df7/_periodic_task_8cpp_source.html#l00048">48</a> of file <a class="el" href="../../de/df7/_periodic_task_8cpp_source.html">PeriodicTask.cpp</a>.</p>

<p>References <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00048">_maxPeriod</a>, and <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00049">_maxRuntime</a>.</p>
<div class="fragment"><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;                            {</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;  <a class="code" href="../../de/d2f/class_periodic_task.html#ae613597442fa17fcbf362de31ce61920">_maxPeriod</a> = 0;</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;  <a class="code" href="../../de/d2f/class_periodic_task.html#afa649a810c363bc0567336e663868421">_maxRuntime</a> = 0;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;}</div><div class="ttc" id="class_periodic_task_html_ae613597442fa17fcbf362de31ce61920"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html#ae613597442fa17fcbf362de31ce61920">PeriodicTask::_maxPeriod</a></div><div class="ttdeci">float _maxPeriod</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d87/_periodic_task_8h_source.html#l00048">PeriodicTask.h:48</a></div></div>
<div class="ttc" id="class_periodic_task_html_afa649a810c363bc0567336e663868421"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html#afa649a810c363bc0567336e663868421">PeriodicTask::_maxRuntime</a></div><div class="ttdeci">float _maxRuntime</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d87/_periodic_task_8h_source.html#l00049">PeriodicTask.h:49</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="aeb803276382ca63ba019191c83ea3a86"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float PeriodicTask::getMaxPeriod </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00037">37</a> of file <a class="el" href="../../dc/d87/_periodic_task_8h_source.html">PeriodicTask.h</a>.</p>

<p>References <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00048">_maxPeriod</a>.</p>
<div class="fragment"><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;{ <span class="keywordflow">return</span> <a class="code" href="../../de/d2f/class_periodic_task.html#ae613597442fa17fcbf362de31ce61920">_maxPeriod</a>; }</div><div class="ttc" id="class_periodic_task_html_ae613597442fa17fcbf362de31ce61920"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html#ae613597442fa17fcbf362de31ce61920">PeriodicTask::_maxPeriod</a></div><div class="ttdeci">float _maxPeriod</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d87/_periodic_task_8h_source.html#l00048">PeriodicTask.h:48</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="adf7a674830010fe0dddf08683cc977dc"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float PeriodicTask::getMaxRuntime </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00039">39</a> of file <a class="el" href="../../dc/d87/_periodic_task_8h_source.html">PeriodicTask.h</a>.</p>

<p>References <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00049">_maxRuntime</a>, and <a class="el" href="../../de/df7/_periodic_task_8cpp_source.html#l00065">loopFunction()</a>.</p>
<div class="fragment"><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;{ <span class="keywordflow">return</span> <a class="code" href="../../de/d2f/class_periodic_task.html#afa649a810c363bc0567336e663868421">_maxRuntime</a>; }</div><div class="ttc" id="class_periodic_task_html_afa649a810c363bc0567336e663868421"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html#afa649a810c363bc0567336e663868421">PeriodicTask::_maxRuntime</a></div><div class="ttdeci">float _maxRuntime</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d87/_periodic_task_8h_source.html#l00049">PeriodicTask.h:49</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-5" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-5-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-5-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-5-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../de/d2f/class_periodic_task_adf7a674830010fe0dddf08683cc977dc_cgraph.png" border="0" usemap="#de/d2f/class_periodic_task_adf7a674830010fe0dddf08683cc977dc_cgraph" alt=""/></div>
<map name="de/d2f/class_periodic_task_adf7a674830010fe0dddf08683cc977dc_cgraph" id="de/d2f/class_periodic_task_adf7a674830010fe0dddf08683cc977dc_cgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a737939f2375ed06e4e7eaf10cdb25a61"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float PeriodicTask::getPeriod </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00033">33</a> of file <a class="el" href="../../dc/d87/_periodic_task_8h_source.html">PeriodicTask.h</a>.</p>

<p>References <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00044">_period</a>.</p>
<div class="fragment"><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;{ <span class="keywordflow">return</span> <a class="code" href="../../de/d2f/class_periodic_task.html#af395b5169de444767ae3b0ccd6175942">_period</a>; }</div><div class="ttc" id="class_periodic_task_html_af395b5169de444767ae3b0ccd6175942"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html#af395b5169de444767ae3b0ccd6175942">PeriodicTask::_period</a></div><div class="ttdeci">float _period</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d87/_periodic_task_8h_source.html#l00044">PeriodicTask.h:44</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a0a6c73bcf016d81e4de77ca8a20f7329"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float PeriodicTask::getRuntime </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00035">35</a> of file <a class="el" href="../../dc/d87/_periodic_task_8h_source.html">PeriodicTask.h</a>.</p>

<p>References <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00046">_lastRuntime</a>.</p>
<div class="fragment"><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;{ <span class="keywordflow">return</span> <a class="code" href="../../de/d2f/class_periodic_task.html#ae3788f2b05fc248745ee93f41da24c8f">_lastRuntime</a>; }</div><div class="ttc" id="class_periodic_task_html_ae3788f2b05fc248745ee93f41da24c8f"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html#ae3788f2b05fc248745ee93f41da24c8f">PeriodicTask::_lastRuntime</a></div><div class="ttdeci">float _lastRuntime</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d87/_periodic_task_8h_source.html#l00046">PeriodicTask.h:46</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a8bc384b67a67e01b29afc0362732204d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void PeriodicTask::init </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Implemented in <a class="el" href="../../dd/de7/class_periodic_member_function.html#abc81b49ca4c37a8cd0fc0a7f9e6dd55e">PeriodicMemberFunction&lt; T &gt;</a>, <a class="el" href="../../dc/d6d/class_print_task_status.html#aba393be7178fa317ab16aa5d1257494a">PrintTaskStatus</a>, <a class="el" href="../../d2/da2/class_periodic_function.html#ad02ce13d1cae1d5b83f0abd8093132dc">PeriodicFunction</a>, <a class="el" href="../../d6/d05/class_robot_interface.html#a4600563c9f745e9d9e649a8db1f8cd78">RobotInterface</a>, <a class="el" href="../../d9/d42/class_robot_runner.html#affa2cfda073a7b1742561154c3081ae5">RobotRunner</a>, and <a class="el" href="../../d4/d77/class_test_periodic_task.html#aae1a6a2913fb2781f1b954fb525cdf57">TestPeriodicTask</a>.</p>

<p><div id="dynsection-6" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-6-trigger" src="../../closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-6-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-6-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../de/d2f/class_periodic_task_a8bc384b67a67e01b29afc0362732204d_icgraph.png" border="0" usemap="#de/d2f/class_periodic_task_a8bc384b67a67e01b29afc0362732204d_icgraph" alt=""/></div>
<map name="de/d2f/class_periodic_task_a8bc384b67a67e01b29afc0362732204d_icgraph" id="de/d2f/class_periodic_task_a8bc384b67a67e01b29afc0362732204d_icgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="ad6928f8428ae4944314011aee9fd4764"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool PeriodicTask::isSlow </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../de/df7/_periodic_task_8cpp_source.html#l00044">44</a> of file <a class="el" href="../../de/df7/_periodic_task_8cpp_source.html">PeriodicTask.cpp</a>.</p>

<p>References <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00048">_maxPeriod</a>, <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00049">_maxRuntime</a>, and <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00044">_period</a>.</p>
<div class="fragment"><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;                          {</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;  <span class="keywordflow">return</span> <a class="code" href="../../de/d2f/class_periodic_task.html#ae613597442fa17fcbf362de31ce61920">_maxPeriod</a> &gt; <a class="code" href="../../de/d2f/class_periodic_task.html#af395b5169de444767ae3b0ccd6175942">_period</a> * 1.3f || <a class="code" href="../../de/d2f/class_periodic_task.html#afa649a810c363bc0567336e663868421">_maxRuntime</a> &gt; <a class="code" href="../../de/d2f/class_periodic_task.html#af395b5169de444767ae3b0ccd6175942">_period</a>;</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;}</div><div class="ttc" id="class_periodic_task_html_af395b5169de444767ae3b0ccd6175942"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html#af395b5169de444767ae3b0ccd6175942">PeriodicTask::_period</a></div><div class="ttdeci">float _period</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d87/_periodic_task_8h_source.html#l00044">PeriodicTask.h:44</a></div></div>
<div class="ttc" id="class_periodic_task_html_ae613597442fa17fcbf362de31ce61920"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html#ae613597442fa17fcbf362de31ce61920">PeriodicTask::_maxPeriod</a></div><div class="ttdeci">float _maxPeriod</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d87/_periodic_task_8h_source.html#l00048">PeriodicTask.h:48</a></div></div>
<div class="ttc" id="class_periodic_task_html_afa649a810c363bc0567336e663868421"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html#afa649a810c363bc0567336e663868421">PeriodicTask::_maxRuntime</a></div><div class="ttdeci">float _maxRuntime</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d87/_periodic_task_8h_source.html#l00049">PeriodicTask.h:49</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-7" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-7-trigger" src="../../closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-7-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-7-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../de/d2f/class_periodic_task_ad6928f8428ae4944314011aee9fd4764_icgraph.png" border="0" usemap="#de/d2f/class_periodic_task_ad6928f8428ae4944314011aee9fd4764_icgraph" alt=""/></div>
<map name="de/d2f/class_periodic_task_ad6928f8428ae4944314011aee9fd4764_icgraph" id="de/d2f/class_periodic_task_ad6928f8428ae4944314011aee9fd4764_icgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a749e849501c8369723c1b7822c5a2dc5"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void PeriodicTask::loopFunction </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../de/df7/_periodic_task_8cpp_source.html#l00065">65</a> of file <a class="el" href="../../de/df7/_periodic_task_8cpp_source.html">PeriodicTask.cpp</a>.</p>

<p>References <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00047">_lastPeriodTime</a>, <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00046">_lastRuntime</a>, <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00048">_maxPeriod</a>, <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00049">_maxRuntime</a>, <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00050">_name</a>, <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00044">_period</a>, <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00045">_running</a>, <a class="el" href="../../dc/dd7/test__casadi_8cpp_source.html#l00202">f()</a>, <a class="el" href="../../d5/d29/_timer_8h_source.html#l00027">Timer::getSeconds()</a>, <a class="el" href="../../de/d2f/class_periodic_task.html#ae6976f44c995555b6403b38443fb2eb5">run()</a>, and <a class="el" href="../../d5/d29/_timer_8h_source.html#l00016">Timer::start()</a>.</p>
<div class="fragment"><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;                                {</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;  <span class="keyword">auto</span> timerFd = timerfd_create(CLOCK_MONOTONIC, 0);</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;  <span class="keywordtype">int</span> seconds = (int)<a class="code" href="../../de/d2f/class_periodic_task.html#af395b5169de444767ae3b0ccd6175942">_period</a>;</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;  <span class="keywordtype">int</span> nanoseconds = (int)(1e9 * std::fmod(<a class="code" href="../../de/d2f/class_periodic_task.html#af395b5169de444767ae3b0ccd6175942">_period</a>, 1.<a class="code" href="../../dc/dd7/test__casadi_8cpp.html#ae20d7fba59865a21504b65cdb44cbfe5">f</a>));</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;  <a class="code" href="../../d8/d08/class_timer.html">Timer</a> t;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;  itimerspec timerSpec;</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;  timerSpec.it_interval.tv_sec = seconds;</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;  timerSpec.it_value.tv_sec = seconds;</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;  timerSpec.it_value.tv_nsec = nanoseconds;</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;  timerSpec.it_interval.tv_nsec = nanoseconds;</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;  timerfd_settime(timerFd, 0, &amp;timerSpec, <span class="keyword">nullptr</span>);</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;  <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span> missed = 0;</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;  printf(<span class="stringliteral">&quot;[PeriodicTask] Start %s (%d s, %d ns)\n&quot;</span>, <a class="code" href="../../de/d2f/class_periodic_task.html#a18972d9e1945410256791965f3730dae">_name</a>.c_str(), seconds,</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;         nanoseconds);</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;  <span class="keywordflow">while</span> (<a class="code" href="../../de/d2f/class_periodic_task.html#a285fb43831f136ac3dce9566b4b50a8d">_running</a>) {</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    <a class="code" href="../../de/d2f/class_periodic_task.html#a5e68d6cc68240995a142b8825b8df174">_lastPeriodTime</a> = (float)t.<a class="code" href="../../d8/d08/class_timer.html#aa42cb0519d30540b49a8c73f8ea81470">getSeconds</a>();</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    t.<a class="code" href="../../d8/d08/class_timer.html#a3a8b5272198d029779dc9302a54305a8">start</a>();</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    <a class="code" href="../../de/d2f/class_periodic_task.html#ae6976f44c995555b6403b38443fb2eb5">run</a>();</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    <a class="code" href="../../de/d2f/class_periodic_task.html#ae3788f2b05fc248745ee93f41da24c8f">_lastRuntime</a> = (float)t.<a class="code" href="../../d8/d08/class_timer.html#aa42cb0519d30540b49a8c73f8ea81470">getSeconds</a>();</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    <span class="keywordtype">int</span> m = read(timerFd, &amp;missed, <span class="keyword">sizeof</span>(missed));</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    (void)m;</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    <a class="code" href="../../de/d2f/class_periodic_task.html#ae613597442fa17fcbf362de31ce61920">_maxPeriod</a> = std::max(<a class="code" href="../../de/d2f/class_periodic_task.html#ae613597442fa17fcbf362de31ce61920">_maxPeriod</a>, <a class="code" href="../../de/d2f/class_periodic_task.html#a5e68d6cc68240995a142b8825b8df174">_lastPeriodTime</a>);</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    <a class="code" href="../../de/d2f/class_periodic_task.html#afa649a810c363bc0567336e663868421">_maxRuntime</a> = std::max(<a class="code" href="../../de/d2f/class_periodic_task.html#afa649a810c363bc0567336e663868421">_maxRuntime</a>, <a class="code" href="../../de/d2f/class_periodic_task.html#ae3788f2b05fc248745ee93f41da24c8f">_lastRuntime</a>);</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;  }</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;  printf(<span class="stringliteral">&quot;[PeriodicTask] %s has stopped!\n&quot;</span>, <a class="code" href="../../de/d2f/class_periodic_task.html#a18972d9e1945410256791965f3730dae">_name</a>.c_str());</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;}</div><div class="ttc" id="class_periodic_task_html_ae3788f2b05fc248745ee93f41da24c8f"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html#ae3788f2b05fc248745ee93f41da24c8f">PeriodicTask::_lastRuntime</a></div><div class="ttdeci">float _lastRuntime</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d87/_periodic_task_8h_source.html#l00046">PeriodicTask.h:46</a></div></div>
<div class="ttc" id="class_timer_html"><div class="ttname"><a href="../../d8/d08/class_timer.html">Timer</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d29/_timer_8h_source.html#l00012">Timer.h:12</a></div></div>
<div class="ttc" id="class_timer_html_a3a8b5272198d029779dc9302a54305a8"><div class="ttname"><a href="../../d8/d08/class_timer.html#a3a8b5272198d029779dc9302a54305a8">Timer::start</a></div><div class="ttdeci">void start()</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d29/_timer_8h_source.html#l00016">Timer.h:16</a></div></div>
<div class="ttc" id="class_periodic_task_html_a285fb43831f136ac3dce9566b4b50a8d"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html#a285fb43831f136ac3dce9566b4b50a8d">PeriodicTask::_running</a></div><div class="ttdeci">volatile bool _running</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d87/_periodic_task_8h_source.html#l00045">PeriodicTask.h:45</a></div></div>
<div class="ttc" id="class_periodic_task_html_a5e68d6cc68240995a142b8825b8df174"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html#a5e68d6cc68240995a142b8825b8df174">PeriodicTask::_lastPeriodTime</a></div><div class="ttdeci">float _lastPeriodTime</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d87/_periodic_task_8h_source.html#l00047">PeriodicTask.h:47</a></div></div>
<div class="ttc" id="class_timer_html_aa42cb0519d30540b49a8c73f8ea81470"><div class="ttname"><a href="../../d8/d08/class_timer.html#aa42cb0519d30540b49a8c73f8ea81470">Timer::getSeconds</a></div><div class="ttdeci">double getSeconds()</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d29/_timer_8h_source.html#l00027">Timer.h:27</a></div></div>
<div class="ttc" id="class_periodic_task_html_af395b5169de444767ae3b0ccd6175942"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html#af395b5169de444767ae3b0ccd6175942">PeriodicTask::_period</a></div><div class="ttdeci">float _period</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d87/_periodic_task_8h_source.html#l00044">PeriodicTask.h:44</a></div></div>
<div class="ttc" id="class_periodic_task_html_ae613597442fa17fcbf362de31ce61920"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html#ae613597442fa17fcbf362de31ce61920">PeriodicTask::_maxPeriod</a></div><div class="ttdeci">float _maxPeriod</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d87/_periodic_task_8h_source.html#l00048">PeriodicTask.h:48</a></div></div>
<div class="ttc" id="class_periodic_task_html_a18972d9e1945410256791965f3730dae"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html#a18972d9e1945410256791965f3730dae">PeriodicTask::_name</a></div><div class="ttdeci">std::string _name</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d87/_periodic_task_8h_source.html#l00050">PeriodicTask.h:50</a></div></div>
<div class="ttc" id="class_periodic_task_html_ae6976f44c995555b6403b38443fb2eb5"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html#ae6976f44c995555b6403b38443fb2eb5">PeriodicTask::run</a></div><div class="ttdeci">virtual void run()=0</div></div>
<div class="ttc" id="class_periodic_task_html_afa649a810c363bc0567336e663868421"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html#afa649a810c363bc0567336e663868421">PeriodicTask::_maxRuntime</a></div><div class="ttdeci">float _maxRuntime</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d87/_periodic_task_8h_source.html#l00049">PeriodicTask.h:49</a></div></div>
<div class="ttc" id="test__casadi_8cpp_html_ae20d7fba59865a21504b65cdb44cbfe5"><div class="ttname"><a href="../../dc/dd7/test__casadi_8cpp.html#ae20d7fba59865a21504b65cdb44cbfe5">f</a></div><div class="ttdeci">MX f(const MX &amp;x, const MX &amp;u)</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/dd7/test__casadi_8cpp_source.html#l00202">test_casadi.cpp:202</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-8" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-8-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-8-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-8-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../de/d2f/class_periodic_task_a749e849501c8369723c1b7822c5a2dc5_cgraph.png" border="0" usemap="#de/d2f/class_periodic_task_a749e849501c8369723c1b7822c5a2dc5_cgraph" alt=""/></div>
<map name="de/d2f/class_periodic_task_a749e849501c8369723c1b7822c5a2dc5_cgraph" id="de/d2f/class_periodic_task_a749e849501c8369723c1b7822c5a2dc5_cgraph">
</map>
</div>
</p>

<p><div id="dynsection-9" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-9-trigger" src="../../closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-9-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-9-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../de/d2f/class_periodic_task_a749e849501c8369723c1b7822c5a2dc5_icgraph.png" border="0" usemap="#de/d2f/class_periodic_task_a749e849501c8369723c1b7822c5a2dc5_icgraph" alt=""/></div>
<map name="de/d2f/class_periodic_task_a749e849501c8369723c1b7822c5a2dc5_icgraph" id="de/d2f/class_periodic_task_a749e849501c8369723c1b7822c5a2dc5_icgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="ab9031986941baaf7183f4d24bc861110"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PeriodicTask::printStatus </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../de/df7/_periodic_task_8cpp_source.html#l00053">53</a> of file <a class="el" href="../../de/df7/_periodic_task_8cpp_source.html">PeriodicTask.cpp</a>.</p>

<p>References <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00047">_lastPeriodTime</a>, <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00046">_lastRuntime</a>, <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00048">_maxPeriod</a>, <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00049">_maxRuntime</a>, <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00050">_name</a>, <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00044">_period</a>, <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00045">_running</a>, <a class="el" href="../../de/df7/_periodic_task_8cpp_source.html#l00044">isSlow()</a>, <a class="el" href="../../d6/df9/_utilities__print_8cpp_source.html#l00003">printf_color()</a>, and <a class="el" href="../../d3/d68/_utilities__print_8h.html#a77255dc095356f8499023fbd092cd835aee38e4d5dd68c4e440825018d549cb47">Red</a>.</p>
<div class="fragment"><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;                               {</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;  <span class="keywordflow">if</span> (!<a class="code" href="../../de/d2f/class_periodic_task.html#a285fb43831f136ac3dce9566b4b50a8d">_running</a>) <span class="keywordflow">return</span>;</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;  <span class="keywordflow">if</span> (<a class="code" href="../../de/d2f/class_periodic_task.html#ad6928f8428ae4944314011aee9fd4764">isSlow</a>()) {</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    <a class="code" href="../../d3/d68/_utilities__print_8h.html#a2b2d015520d3b5e1562e8d70609a2b63">printf_color</a>(<a class="code" href="../../d3/d68/_utilities__print_8h.html#a77255dc095356f8499023fbd092cd835aee38e4d5dd68c4e440825018d549cb47">PrintColor::Red</a>, <span class="stringliteral">&quot;|%-20s|%6.4f|%6.4f|%6.4f|%6.4f|%6.4f\n&quot;</span>,</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;                 <a class="code" href="../../de/d2f/class_periodic_task.html#a18972d9e1945410256791965f3730dae">_name</a>.c_str(), <a class="code" href="../../de/d2f/class_periodic_task.html#ae3788f2b05fc248745ee93f41da24c8f">_lastRuntime</a>, <a class="code" href="../../de/d2f/class_periodic_task.html#afa649a810c363bc0567336e663868421">_maxRuntime</a>, <a class="code" href="../../de/d2f/class_periodic_task.html#af395b5169de444767ae3b0ccd6175942">_period</a>,</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;                 <a class="code" href="../../de/d2f/class_periodic_task.html#a5e68d6cc68240995a142b8825b8df174">_lastPeriodTime</a>, <a class="code" href="../../de/d2f/class_periodic_task.html#ae613597442fa17fcbf362de31ce61920">_maxPeriod</a>);</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    printf(<span class="stringliteral">&quot;|%-20s|%6.4f|%6.4f|%6.4f|%6.4f|%6.4f\n&quot;</span>, <a class="code" href="../../de/d2f/class_periodic_task.html#a18972d9e1945410256791965f3730dae">_name</a>.c_str(),</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;           <a class="code" href="../../de/d2f/class_periodic_task.html#ae3788f2b05fc248745ee93f41da24c8f">_lastRuntime</a>, <a class="code" href="../../de/d2f/class_periodic_task.html#afa649a810c363bc0567336e663868421">_maxRuntime</a>, <a class="code" href="../../de/d2f/class_periodic_task.html#af395b5169de444767ae3b0ccd6175942">_period</a>, <a class="code" href="../../de/d2f/class_periodic_task.html#a5e68d6cc68240995a142b8825b8df174">_lastPeriodTime</a>, <a class="code" href="../../de/d2f/class_periodic_task.html#ae613597442fa17fcbf362de31ce61920">_maxPeriod</a>);</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;  }</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;}</div><div class="ttc" id="class_periodic_task_html_ae3788f2b05fc248745ee93f41da24c8f"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html#ae3788f2b05fc248745ee93f41da24c8f">PeriodicTask::_lastRuntime</a></div><div class="ttdeci">float _lastRuntime</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d87/_periodic_task_8h_source.html#l00046">PeriodicTask.h:46</a></div></div>
<div class="ttc" id="class_periodic_task_html_ad6928f8428ae4944314011aee9fd4764"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html#ad6928f8428ae4944314011aee9fd4764">PeriodicTask::isSlow</a></div><div class="ttdeci">bool isSlow()</div><div class="ttdef"><b>Definition:</b> <a href="../../de/df7/_periodic_task_8cpp_source.html#l00044">PeriodicTask.cpp:44</a></div></div>
<div class="ttc" id="_utilities__print_8h_html_a77255dc095356f8499023fbd092cd835aee38e4d5dd68c4e440825018d549cb47"><div class="ttname"><a href="../../d3/d68/_utilities__print_8h.html#a77255dc095356f8499023fbd092cd835aee38e4d5dd68c4e440825018d549cb47">PrintColor::Red</a></div></div>
<div class="ttc" id="class_periodic_task_html_a285fb43831f136ac3dce9566b4b50a8d"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html#a285fb43831f136ac3dce9566b4b50a8d">PeriodicTask::_running</a></div><div class="ttdeci">volatile bool _running</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d87/_periodic_task_8h_source.html#l00045">PeriodicTask.h:45</a></div></div>
<div class="ttc" id="class_periodic_task_html_a5e68d6cc68240995a142b8825b8df174"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html#a5e68d6cc68240995a142b8825b8df174">PeriodicTask::_lastPeriodTime</a></div><div class="ttdeci">float _lastPeriodTime</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d87/_periodic_task_8h_source.html#l00047">PeriodicTask.h:47</a></div></div>
<div class="ttc" id="class_periodic_task_html_af395b5169de444767ae3b0ccd6175942"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html#af395b5169de444767ae3b0ccd6175942">PeriodicTask::_period</a></div><div class="ttdeci">float _period</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d87/_periodic_task_8h_source.html#l00044">PeriodicTask.h:44</a></div></div>
<div class="ttc" id="class_periodic_task_html_ae613597442fa17fcbf362de31ce61920"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html#ae613597442fa17fcbf362de31ce61920">PeriodicTask::_maxPeriod</a></div><div class="ttdeci">float _maxPeriod</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d87/_periodic_task_8h_source.html#l00048">PeriodicTask.h:48</a></div></div>
<div class="ttc" id="class_periodic_task_html_a18972d9e1945410256791965f3730dae"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html#a18972d9e1945410256791965f3730dae">PeriodicTask::_name</a></div><div class="ttdeci">std::string _name</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d87/_periodic_task_8h_source.html#l00050">PeriodicTask.h:50</a></div></div>
<div class="ttc" id="_utilities__print_8h_html_a2b2d015520d3b5e1562e8d70609a2b63"><div class="ttname"><a href="../../d3/d68/_utilities__print_8h.html#a2b2d015520d3b5e1562e8d70609a2b63">printf_color</a></div><div class="ttdeci">void printf_color(PrintColor color, const char *fmt,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../d6/df9/_utilities__print_8cpp_source.html#l00003">Utilities_print.cpp:3</a></div></div>
<div class="ttc" id="class_periodic_task_html_afa649a810c363bc0567336e663868421"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html#afa649a810c363bc0567336e663868421">PeriodicTask::_maxRuntime</a></div><div class="ttdeci">float _maxRuntime</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d87/_periodic_task_8h_source.html#l00049">PeriodicTask.h:49</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-10" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-10-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-10-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-10-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../de/d2f/class_periodic_task_ab9031986941baaf7183f4d24bc861110_cgraph.png" border="0" usemap="#de/d2f/class_periodic_task_ab9031986941baaf7183f4d24bc861110_cgraph" alt=""/></div>
<map name="de/d2f/class_periodic_task_ab9031986941baaf7183f4d24bc861110_cgraph" id="de/d2f/class_periodic_task_ab9031986941baaf7183f4d24bc861110_cgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="ae6976f44c995555b6403b38443fb2eb5"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void PeriodicTask::run </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Implemented in <a class="el" href="../../dd/de7/class_periodic_member_function.html#aa012ab2aa7e572756800ad63f98ba1fc">PeriodicMemberFunction&lt; T &gt;</a>, <a class="el" href="../../dc/d6d/class_print_task_status.html#a77fa251297f42f91ed09050f3918a15b">PrintTaskStatus</a>, <a class="el" href="../../d2/da2/class_periodic_function.html#a11caf69d88dcb6bc6d1bbf95461015a8">PeriodicFunction</a>, <a class="el" href="../../d6/d05/class_robot_interface.html#a3432a54d34a7752e6e25bb0bcaa0be2a">RobotInterface</a>, <a class="el" href="../../d9/d42/class_robot_runner.html#a00f9204f3367b9948a2053e66d92c844">RobotRunner</a>, and <a class="el" href="../../d4/d77/class_test_periodic_task.html#a20cc9f0b3d2b181000261960eada5e06">TestPeriodicTask</a>.</p>

<p><div id="dynsection-11" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-11-trigger" src="../../closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-11-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-11-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../de/d2f/class_periodic_task_ae6976f44c995555b6403b38443fb2eb5_icgraph.png" border="0" usemap="#de/d2f/class_periodic_task_ae6976f44c995555b6403b38443fb2eb5_icgraph" alt=""/></div>
<map name="de/d2f/class_periodic_task_ae6976f44c995555b6403b38443fb2eb5_icgraph" id="de/d2f/class_periodic_task_ae6976f44c995555b6403b38443fb2eb5_icgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a23a65ac2dff9750a0f0d6416f2f32a6f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PeriodicTask::start </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../de/df7/_periodic_task_8cpp_source.html#l00020">20</a> of file <a class="el" href="../../de/df7/_periodic_task_8cpp_source.html">PeriodicTask.cpp</a>.</p>

<p>References <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00050">_name</a>, <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00045">_running</a>, <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00051">_thread</a>, <a class="el" href="../../de/d2f/class_periodic_task.html#a8bc384b67a67e01b29afc0362732204d">init()</a>, and <a class="el" href="../../de/df7/_periodic_task_8cpp_source.html#l00065">loopFunction()</a>.</p>
<div class="fragment"><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;                         {</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;  <span class="keywordflow">if</span> (<a class="code" href="../../de/d2f/class_periodic_task.html#a285fb43831f136ac3dce9566b4b50a8d">_running</a>) {</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;    printf(<span class="stringliteral">&quot;[PeriodicTask] Tried to start %s but it was already running!\n&quot;</span>,</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;           <a class="code" href="../../de/d2f/class_periodic_task.html#a18972d9e1945410256791965f3730dae">_name</a>.c_str());</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;    <span class="keywordflow">return</span>;</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;  }</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;  <a class="code" href="../../de/d2f/class_periodic_task.html#a8bc384b67a67e01b29afc0362732204d">init</a>();</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;  <a class="code" href="../../de/d2f/class_periodic_task.html#a285fb43831f136ac3dce9566b4b50a8d">_running</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;  <a class="code" href="../../de/d2f/class_periodic_task.html#aa7928c99eb0134cf58398c7eb885c41c">_thread</a> = std::thread(&amp;<a class="code" href="../../de/d2f/class_periodic_task.html#a749e849501c8369723c1b7822c5a2dc5">PeriodicTask::loopFunction</a>, <span class="keyword">this</span>);</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;}</div><div class="ttc" id="class_periodic_task_html_a749e849501c8369723c1b7822c5a2dc5"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html#a749e849501c8369723c1b7822c5a2dc5">PeriodicTask::loopFunction</a></div><div class="ttdeci">void loopFunction()</div><div class="ttdef"><b>Definition:</b> <a href="../../de/df7/_periodic_task_8cpp_source.html#l00065">PeriodicTask.cpp:65</a></div></div>
<div class="ttc" id="class_periodic_task_html_a285fb43831f136ac3dce9566b4b50a8d"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html#a285fb43831f136ac3dce9566b4b50a8d">PeriodicTask::_running</a></div><div class="ttdeci">volatile bool _running</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d87/_periodic_task_8h_source.html#l00045">PeriodicTask.h:45</a></div></div>
<div class="ttc" id="class_periodic_task_html_a18972d9e1945410256791965f3730dae"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html#a18972d9e1945410256791965f3730dae">PeriodicTask::_name</a></div><div class="ttdeci">std::string _name</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d87/_periodic_task_8h_source.html#l00050">PeriodicTask.h:50</a></div></div>
<div class="ttc" id="class_periodic_task_html_a8bc384b67a67e01b29afc0362732204d"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html#a8bc384b67a67e01b29afc0362732204d">PeriodicTask::init</a></div><div class="ttdeci">virtual void init()=0</div></div>
<div class="ttc" id="class_periodic_task_html_aa7928c99eb0134cf58398c7eb885c41c"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html#aa7928c99eb0134cf58398c7eb885c41c">PeriodicTask::_thread</a></div><div class="ttdeci">std::thread _thread</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d87/_periodic_task_8h_source.html#l00051">PeriodicTask.h:51</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-12" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-12-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-12-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-12-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../de/d2f/class_periodic_task_a23a65ac2dff9750a0f0d6416f2f32a6f_cgraph.png" border="0" usemap="#de/d2f/class_periodic_task_a23a65ac2dff9750a0f0d6416f2f32a6f_cgraph" alt=""/></div>
<map name="de/d2f/class_periodic_task_a23a65ac2dff9750a0f0d6416f2f32a6f_cgraph" id="de/d2f/class_periodic_task_a23a65ac2dff9750a0f0d6416f2f32a6f_cgraph">
</map>
</div>
</p>

<p><div id="dynsection-13" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-13-trigger" src="../../closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-13-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-13-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../de/d2f/class_periodic_task_a23a65ac2dff9750a0f0d6416f2f32a6f_icgraph.png" border="0" usemap="#de/d2f/class_periodic_task_a23a65ac2dff9750a0f0d6416f2f32a6f_icgraph" alt=""/></div>
<map name="de/d2f/class_periodic_task_a23a65ac2dff9750a0f0d6416f2f32a6f_icgraph" id="de/d2f/class_periodic_task_a23a65ac2dff9750a0f0d6416f2f32a6f_icgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="ad24498c03bd938845244546d52dfa24b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PeriodicTask::stop </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../de/df7/_periodic_task_8cpp_source.html#l00031">31</a> of file <a class="el" href="../../de/df7/_periodic_task_8cpp_source.html">PeriodicTask.cpp</a>.</p>

<p>References <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00050">_name</a>, <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00045">_running</a>, <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00051">_thread</a>, and <a class="el" href="../../de/d2f/class_periodic_task.html#a5b4d756df249cf8adda268d509390ef4">cleanup()</a>.</p>
<div class="fragment"><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;                        {</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;  <span class="keywordflow">if</span> (!<a class="code" href="../../de/d2f/class_periodic_task.html#a285fb43831f136ac3dce9566b4b50a8d">_running</a>) {</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;    printf(<span class="stringliteral">&quot;[PeriodicTask] Tried to stop %s but it wasn&#39;t running!\n&quot;</span>,</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;           <a class="code" href="../../de/d2f/class_periodic_task.html#a18972d9e1945410256791965f3730dae">_name</a>.c_str());</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    <span class="keywordflow">return</span>;</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;  }</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;  <a class="code" href="../../de/d2f/class_periodic_task.html#a285fb43831f136ac3dce9566b4b50a8d">_running</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;  printf(<span class="stringliteral">&quot;[PeriodicTask] Waiting for %s to stop...\n&quot;</span>, <a class="code" href="../../de/d2f/class_periodic_task.html#a18972d9e1945410256791965f3730dae">_name</a>.c_str());</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;  <a class="code" href="../../de/d2f/class_periodic_task.html#aa7928c99eb0134cf58398c7eb885c41c">_thread</a>.join();</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;  printf(<span class="stringliteral">&quot;[PeriodicTask] Done!\n&quot;</span>);</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;  <a class="code" href="../../de/d2f/class_periodic_task.html#a5b4d756df249cf8adda268d509390ef4">cleanup</a>();</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;}</div><div class="ttc" id="class_periodic_task_html_a285fb43831f136ac3dce9566b4b50a8d"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html#a285fb43831f136ac3dce9566b4b50a8d">PeriodicTask::_running</a></div><div class="ttdeci">volatile bool _running</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d87/_periodic_task_8h_source.html#l00045">PeriodicTask.h:45</a></div></div>
<div class="ttc" id="class_periodic_task_html_a18972d9e1945410256791965f3730dae"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html#a18972d9e1945410256791965f3730dae">PeriodicTask::_name</a></div><div class="ttdeci">std::string _name</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d87/_periodic_task_8h_source.html#l00050">PeriodicTask.h:50</a></div></div>
<div class="ttc" id="class_periodic_task_html_aa7928c99eb0134cf58398c7eb885c41c"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html#aa7928c99eb0134cf58398c7eb885c41c">PeriodicTask::_thread</a></div><div class="ttdeci">std::thread _thread</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d87/_periodic_task_8h_source.html#l00051">PeriodicTask.h:51</a></div></div>
<div class="ttc" id="class_periodic_task_html_a5b4d756df249cf8adda268d509390ef4"><div class="ttname"><a href="../../de/d2f/class_periodic_task.html#a5b4d756df249cf8adda268d509390ef4">PeriodicTask::cleanup</a></div><div class="ttdeci">virtual void cleanup()=0</div></div>
</div><!-- fragment -->
<p><div id="dynsection-14" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-14-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-14-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-14-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../de/d2f/class_periodic_task_ad24498c03bd938845244546d52dfa24b_cgraph.png" border="0" usemap="#de/d2f/class_periodic_task_ad24498c03bd938845244546d52dfa24b_cgraph" alt=""/></div>
<map name="de/d2f/class_periodic_task_ad24498c03bd938845244546d52dfa24b_cgraph" id="de/d2f/class_periodic_task_ad24498c03bd938845244546d52dfa24b_cgraph">
</map>
</div>
</p>

<p><div id="dynsection-15" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-15-trigger" src="../../closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-15-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-15-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../de/d2f/class_periodic_task_ad24498c03bd938845244546d52dfa24b_icgraph.png" border="0" usemap="#de/d2f/class_periodic_task_ad24498c03bd938845244546d52dfa24b_icgraph" alt=""/></div>
<map name="de/d2f/class_periodic_task_ad24498c03bd938845244546d52dfa24b_icgraph" id="de/d2f/class_periodic_task_ad24498c03bd938845244546d52dfa24b_icgraph">
</map>
</div>
</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a5e68d6cc68240995a142b8825b8df174"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float PeriodicTask::_lastPeriodTime = 0</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00047">47</a> of file <a class="el" href="../../dc/d87/_periodic_task_8h_source.html">PeriodicTask.h</a>.</p>

</div>
</div>
<a class="anchor" id="ae3788f2b05fc248745ee93f41da24c8f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float PeriodicTask::_lastRuntime = 0</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00046">46</a> of file <a class="el" href="../../dc/d87/_periodic_task_8h_source.html">PeriodicTask.h</a>.</p>

</div>
</div>
<a class="anchor" id="ae613597442fa17fcbf362de31ce61920"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float PeriodicTask::_maxPeriod = 0</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00048">48</a> of file <a class="el" href="../../dc/d87/_periodic_task_8h_source.html">PeriodicTask.h</a>.</p>

</div>
</div>
<a class="anchor" id="afa649a810c363bc0567336e663868421"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float PeriodicTask::_maxRuntime = 0</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00049">49</a> of file <a class="el" href="../../dc/d87/_periodic_task_8h_source.html">PeriodicTask.h</a>.</p>

</div>
</div>
<a class="anchor" id="a18972d9e1945410256791965f3730dae"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string PeriodicTask::_name</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00050">50</a> of file <a class="el" href="../../dc/d87/_periodic_task_8h_source.html">PeriodicTask.h</a>.</p>

</div>
</div>
<a class="anchor" id="af395b5169de444767ae3b0ccd6175942"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float PeriodicTask::_period</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00044">44</a> of file <a class="el" href="../../dc/d87/_periodic_task_8h_source.html">PeriodicTask.h</a>.</p>

</div>
</div>
<a class="anchor" id="a285fb43831f136ac3dce9566b4b50a8d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">volatile bool PeriodicTask::_running = false</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00045">45</a> of file <a class="el" href="../../dc/d87/_periodic_task_8h_source.html">PeriodicTask.h</a>.</p>

</div>
</div>
<a class="anchor" id="aa7928c99eb0134cf58398c7eb885c41c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::thread PeriodicTask::_thread</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../dc/d87/_periodic_task_8h_source.html#l00051">51</a> of file <a class="el" href="../../dc/d87/_periodic_task_8h_source.html">PeriodicTask.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="../../dc/d87/_periodic_task_8h_source.html">PeriodicTask.h</a></li>
<li><a class="el" href="../../de/df7/_periodic_task_8cpp_source.html">PeriodicTask.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../de/d2f/class_periodic_task.html">PeriodicTask</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
